package com.cxf.windex.enums;

/**
 * @program: business_needs
 * @description: 审核状态
 * @author: chenxf
 * @create: 2018-11-08 15:44
 **/
public enum ReviewEnum {
  REVIEWFAIL("2", "审核未通过"),
  REVIEWSUC("1", "审核通过"),
  PENDINGREVIEW("0", "待审核");

  private final String key;
  private final String desc;

  private ReviewEnum(String key, String desc) {
    this.key = key;
    this.desc = desc;
  }

  public static ReviewEnum keyOf(String key) {
    switch (key) {
      case "0":
        return ReviewEnum.PENDINGREVIEW;
      case "1":
        return ReviewEnum.REVIEWSUC;
      case "2":
        return ReviewEnum.REVIEWFAIL;
      default:
        return null;
    }
  }

  public String getKey() {
    return this.key;
  }

  public String getDesc() {
    return this.desc;
  }
}
